# #报错了
# from fdfs_client.client import Fdfs_client
#
# def upload_file(client_config_fiel):
#     try:
#         client = Fdfs_client(client_config_fiel)
#         result = client.upload_by_filename('local_file.jpg')
#         if 'Remote file_id' in result:
#             file_id = result['Remote file_id']
#             print('File uploaded successfully. File ID:', file_id)
#     except Exception as e:
#         print(e)
#
# upload_file("/etc/fdfs/client.conf")
#
#
# def download_file():
#     try:
#         client = Fdfs_client('your_fdfs_client.conf')
#         file_info = client.download_to_buffer('group1/M00/xx/xx/xxxxxxxxxxxx.jpg')
#         if 'Content' in file_info:
#             content = file_info['Content']
#             with open('downloaded.jpg', 'wb') as f:
#                 f.write(content)
#             print('File downloaded successfully.')
#     except Exception as e:
#         print(e)
#
# download_file()
